package site.brood.common.core.user;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Set;

/**
 * 用户信息
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class LoginUserVO implements Serializable
{
    private Long id;
    private String deptId;
    private String username;
    private String nickname;
    private String password;
    private String email;
    private String phone;
    private String sex;
    private String avatar;
    private String status;
    private String deleted;
    private String loginIp;
    private LocalDateTime loginDate;
    private String createBy;
    private LocalDateTime createTime;
    private String updateBy;
    private LocalDateTime updateTime;
    private String remark;

    /**
     * 用户详情在redis中的key
     * 格式:uuid
     */
    private String cacheKey;


    /**
     * 过期时间
     */
    private LocalDateTime expireTime;

    /**
     * 菜单功能点权限列表
     * 管理员只有一条通配权限：*:*:*
     * 普通用户存所有可访问菜单权限列表：
     * 例如：系统->配置->添加菜单功能点权限格式：system:config:add
     * 若用户具备权限:system:config:*，则也可以访问系统->配置->添加菜单
     */
    private Set<String> permissions;

    /**
     * 角色列表
     */
    private Set<String> roles;

}
